export default {
    data() {
        return {
            // myMixins中定义的变量
            platform: 'PC',
            ismobile: 'MOBILE'
        }
    },
    created() {
    },
    beforeCreate() {
        // console.log("创建前：");
    },
    beforeMount() {
        this.platform = 'PC'
        this.ismobile = 'MOBILE'
        // console.log('mixins-beforeMount===', this.platform)

        var userAgent = navigator.userAgent.toLowerCase();
        if (!userAgent.match(".*(ip(hone|od)).*") && !userAgent.match(".*(android.+mobile|bada\\/|blackberry|iemobile|kindle|wap|windows (ce|phone)).*")) {
            // console.log("运行在电脑平台");
            this.platform = 'PC'
        } else {
            // console.log("运行在手机平台");
            this.platform = 'MOBILE'
        }
    },
}
